package com.qf.data.controller;

import com.qf.data.service.UserService;
import com.qf.data.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author chengqiang
 * @Create 2024-01-09-21:26
 * @Description:
 */
@RestController
@RequestMapping("/user")
@Api(tags = "Api接口")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/str")
    @ResponseBody
    public String test(String str){
        return "测试接口";
    }

    @GetMapping("/list")
    @ApiOperation("查询所有信息")
    public List<User> getUser(){
        return userService.queryUser();
    }


}
